package main

import (
	"fmt"
)

//goto break continue
func main() {
	fmt.Println("examp11")
	//goto
	if i := 10; i < 50 {
		goto label1
	}
	fmt.Println("被跳过了")
label1:
	fmt.Println("被执行了")
	//break
label2:
	for i := 0; i < 10; i++ {
		for j := 0; j < 10; j++ {
			fmt.Println(j)
			if j == 3 {
				break label2 //跳出
			}
		}
	}
	fmt.Println("----------------------")
	//continue
label3:
	for i := 0; i < 10; i++ {
		for j := 0; j < 10; j++ {
			fmt.Println(j)
			if j == 3 {
				continue label3 //跳出当前，一直到i>=10
			}
		}
	}
}
